<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<script type="text/javascript">
	$(function() {
		//$('#inputForm input').tooltip({'placement':'top'});
		$('#inputForm input').tooltip();
		//表单验证
		$('#inputForm').checkForm();

		$('#inputForm').ajaxForm({
			url : _ctx + "/usermgr/update_user.do",
			type : "post",
			dataType : "json",
			beforeSubmit : function() {
				$("#sbmBtn").attr("disabled", "disabled");
			},
			clearForm : false,
			resetForm : false,
			success : function(resp) {
				if (resp.status == '1') {
					ui.msg(resp.msg, 1);
					ui.go(_ctx + '/usermgr/user_list.do');
				} else {
					ui.msg(resp.msg, 0);
				}
				$("#sbmBtn").removeClass("disabled").attr("disabled", null);
			},
			error : function(resp) {
				ui.msg('请求发送失败', 0);
				$("#sbmBtn").removeClass("disabled").attr("disabled", null);
			}
		});
		
		
	});
	
	
</script>
</head>
<body>
	<%@ include file="/WEB-INF/view/common/topbar.jsp"%>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<%@ include file="/WEB-INF/view/common/sidebar.jsp"%>
			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb">
						<li><i class="icon-home home-icon"></i> <a href="#">首页</a>
						</li>
						<li><a href="#">系统管理</a>
						</li>
						<li><a href="#">用户管理</a>
						</li>
						<li class="active">修改</li>
					</ul>
				</div>
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
							<div class="widget-box">
								<div
									class="widget-header  widget-header-flat widget-header-small">
									<div class="widget-toolbar no-border">
										<a class="btn btn-primary btn-xs"
											href="${ctx }/usermgr/user_list.do"><i
											class="icon-arrow-left"></i> 返回&nbsp;&nbsp;</a>
									</div>
								</div>
								<div class="widget-body">
									<div class="widget-main">
										<c:set var="vo" value="${_data }"></c:set>
										<form class="form-horizontal" role="form" id="inputForm"
											action="" method="post">
											<input type="hidden" id="id" name="id" value="${vo.id }">
											<div class="form-group">
												<div class="col-sm-3 control-label no-padding-right"
													for="userName">用户名</div>
												<div class="col-sm-4" style="padding-top: 5px;">
														<span class="middle"> ${vo.userName }</span>
													</div>
											</div>
											<div class="form-group">
												<div class="col-sm-3 control-label no-padding-right"
													for="email">邮箱*</div>
												<div class="col-sm-9">
													<input type="email" class="col-xs-10 col-sm-5" 
														name="email" id="email" datatype="require|email" msg="请输入邮箱！|请输入正确的邮箱地址！" 
														value="${vo.email }"
														title="邮箱" placeholder="请输入邮箱" />
												</div>
											</div>
											<div class="form-group">
												<div class="col-sm-3 control-label no-padding-right"
													for="tel">联系电话</div>
												<div class="col-sm-9">
													<input type="text" class="col-xs-10 col-sm-5" datatype="phoneOrMobile" 
														name="tel" id="tel"  value="${vo.tel }" msg="请输正确的联系电话(8位或11位)！"
														title="联系电话" placeholder="请输入联系电话" />
												</div>
											</div>
											<div class="space-4"></div>
											<div class="form-group">
												<div class="col-sm-3 control-label no-padding-right">备注</div>
												<div class="col-sm-9 ">
													<textarea class="col-sm-5" placeholder="请输入备注"
														name="remark" id="remark" title="备注">${vo.remark }</textarea>
												</div>
											</div>
											<hr>
											<div class="clearfix form-group">
												<div class="col-md-offset-3 col-md-9">
													<button type="submit" class="btn btn-sm btn-info"
														id="sbmBtn">
														<i class="icon-ok bigger-110"></i>提交
													</button>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>